<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function shuzhi(n) {    //n代表的是变量
        let sum = 1;
        for (let i = 1; i <= n; i++) {
          sum = sum * i;
        }
        alert(sum);
      }
      shuzhi(10)  //括号里面的元素相当于给n赋值

      // 注意点！！！尽量让形参和实参个数一致
      
    </script>
  </body>
</html>
